From 1065622448c1cc5a10425914f02708750046b17e Mon Sep 17 00:00:00 2001 From: George Dunlap Date: Thu, 25 Feb 2016 14:49:00 +0000 Subject: [PATCH] tools/xenalyze: Fix check for error return value fdopen returns NULL on failure, not a negative integer. CID 1306863 CID 1306858 Signed-off-by: George Dunlap Acked-by: Ian Jackson --- tools/xentrace/xenalyze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/xentrace/xenalyze.c b/tools/xentrace/xenalyze.c index 33f812919b..d071f9d23c 100644 --- a/tools/xentrace/xenalyze.c +++ b/tools/xentrace/xenalyze.c @@ -9028,7 +9028,7 @@ void progress_init(void) { opt.progress = 0; } - if( (G.progress.out = fdopen(G.progress.pipe[1], "w")) < 0 ) { + if( (G.progress.out = fdopen(G.progress.pipe[1], "w")) == NULL ) { fprintf(stderr, "%s: could not fdopen pipe: %s, disabling progress bar\n", __func__, strerror(errno)); opt.progress = 0; -- 2.30.2